package net.yunzhanyi.common.core.utils;

import net.yunzhanyi.common.core.exception.BaseException;
import org.jetbrains.annotations.Nullable;

/**
 * @author bestct
 * @date 2022/9/18
 * @type 类
 */

public class AssertUtils {
    public static void isTrue(boolean expression, String message) {
        if (!expression) {
            throw new BaseException(message);
        }
    }

    public static void notNull(@Nullable Object object, String message) {
        if (object == null) {
            throw new BaseException(message);
        }
    }
}
